<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%> 
<%@ page import="java.text.SimpleDateFormat"%> 
<%@ page import="com.nmes.naljava.entity.*"%>
<%
	//Account a = (Account)request.getAttribute("Account");  // 단일 정보
	List<Account> list = (List<Account>)request.getAttribute("list"); //리스트 객체를 전달 받는다.
	SimpleDateFormat sdf = new SimpleDateFormat("M/d/yyyy");
%>
<html> 
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>날자바 리스트</title>
</head> 
<body>
		<p> <a href="SaveData?action=boardList2">리스트 보기2</a></p>
		<% Account a = (Account)list.get(0); %>
		<form action="/ImageTransform" method="POST" enctype="multipart/form-data">
		<!--  -->
		<input type="hidden" name="action" value="updateBoard">
		<input type="hidden" name="id" value="<%= a.getId() %>">
		<table border="0" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC" style="width: 1024px; height: 308px">
		<tr bgcolor="#407BA8">
			<td style="color: #ffffff; font-weight: bold; width: 79px">제목</td>
			<td bgcolor="#ffffff"><input type="input" name="title" style="width: 470px;" value="<%=a.getTitle() %>"></td>
		</tr>
		<tr bgcolor="#407BA8">
			<td style="color: #ffffff; font-weight: bold;">카테고리</td>
			<td bgcolor="#ffffff"><input type="input" name="categori" value="<%=a.getCategory() %>"></td> 
		</tr>
		<tr bgcolor="#407BA8">
			<td style="color: #ffffff; font-weight: bold;"><p align="center">내용</p></td>
			<td bgcolor="#ffffff"><input type="textarea" name="content" style="height: 144px; width: 469px" value="<%=a.getContent() %>"></td>
		</tr>
		<tr bgcolor="#407BA8">
			<td style="color: #ffffff; font-weight: bold;">이미지 변경</td>
			<td bgcolor="#ffffff"><img src="/ImageSource?id=<%= a.getId() %>" /><br>
			<input type="file" name="image" style="width: 466px;" ></td>
			
		</tr>
		<tr bgcolor="#407BA8">
			<td style="color: #ffffff; font-weight: bold;">작성자</td>
			<td bgcolor="#ffffff"><input type="input" name="writer" value="<%=a.getWriter() %>"></td>
		</tr>
		<tr>
			<td colspan="2" bgcolor="#ffffff" align="center">
				<input type="submit" value="등록"></td>
		</tr> 
	</table>

	<p/>
</body> 
</html>